package com.disruptor.orderusage;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;

/**
 * Created by ASUS on 2017-12-08.
 */
public class OrderEventHandler1 implements EventHandler<OrderEvent>,WorkHandler<OrderEvent>{

    public void onEvent(OrderEvent orderEvent, long l, boolean b) throws Exception {
        this.onEvent(orderEvent);
    }

    public void onEvent(OrderEvent orderEvent) throws Exception {
        System.out.println("当前---->" + getClass().getName());
        orderEvent.setId(111);
    }
}
